package com.zhizuobiao.web;


import com.zhizuobiao.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class UserController {


    @Autowired
    @Qualifier("userService")
    private UserService userService;

    @RequestMapping(value = "/ssm", method = RequestMethod.GET)
    @ResponseBody
    public String SSM() {
        System.out.println("okok!!");
        String result = userService.getUserList().toString();
        return "result =" + result;
    }

    @RequestMapping(value = "/hello", method = RequestMethod.GET)
    @ResponseBody
    public String hello() {
        return "hello world !!!";
    }

}
